<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <title>编辑银行卡</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <style>
        body {
            background-color: #f5f8fa;
            font-family: 'Inter', sans-serif;
            padding: 20px;
        }

       .container {
            max-width: 600px;
            margin: 0 auto;
            background-color: white;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            padding: 25px;
        }

        h2 {
            color: #0f3460;
            margin-bottom: 20px;
            font-weight: 600;
        }

       .form-group {
            margin-bottom: 15px;
        }

        label {
            display: block;
            margin-bottom: 5px;
            font-weight: 500;
            color: #333;
        }

       .form-control {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 6px;
        }

       .form-control:focus {
            outline: none;
            border-color: #0f3460;
            box-shadow: 0 0 0 2px rgba(15, 52, 96, 0.2);
        }

       .form-check {
            display: flex;
            align-items: center;
        }

       .form-check-input {
            margin-right: 8px;
        }

       .form-check-label {
            font-weight: 400;
            color: #333;
        }

        button[type="submit"] {
            background-color: #0f3460;
            color: white;
            border: none;
            border-radius: 6px;
            padding: 10px 15px;
            cursor: pointer;
            font-weight: 500;
            width: 100%;
            margin-top: 10px;
        }

        button[type="submit"]:hover {
            background-color: #1a508b;
        }

       .btn-secondary {
            background-color: #6c757d;
            color: white;
            border: none;
            border-radius: 6px;
            padding: 10px 15px;
            cursor: pointer;
            font-weight: 500;
            width: 100%;
            margin-top: 10px;
        }

       .btn-secondary:hover {
            background-color: #5a6268;
            color: white;
        }

    </style>
</head>

<body>
    <div class="container">
        <h2>编辑银行卡</h2>
        <form method="post">
            <div class="form-group">
                <label for="cardID">卡号</label>
                <input type="text" id="cardID" class="form-control" value="{{ card.cardID }}" disabled>
            </div>
            <div class="form-group">
                <label for="balance">余额</label>
                <input type="number" id="balance" step="0.01" class="form-control" name="balance" value="{{ card.balance }}" required>
            </div>
            <div class="form-group">
                <label for="password">密码</label>
                <input type="text" id="password" class="form-control" name="password" value="{{ card.pass }}" required>
            </div>
            <div class="form-group">
                <label for="IsReportLoss">是否挂失</label>
                <div class="form-check">
                    <input class="form-check-input" type="checkbox" id="IsReportLoss" name="IsReportLoss"
                           {% if card.IsReportLoss %}checked{% endif %}>
                    <label class="form-check-label" for="IsReportLoss">
                        是否挂失
                    </label>
                </div>
            </div>
            <button type="submit" class="btn btn-primary">
                <i class="fa fa-save"></i> 保存
            </button>
            <a href="{{ url_for('admin.list_cards') }}" class="btn btn-secondary">
                <i class="fa fa-times"></i> 取消
            </button>
        </form>
    </div>
</body>

</html>